<?php
namespace Yd\Controller;
use Common\Controller\HomebaseController;

class ReportController extends HomebaseController{
	
	function _initialize() {
		parent::_initialize();
	}
	
	function index(){
		$this->display();
	}
	
	public function ajax_cx(){
		if (IS_POST) {
			$data = I('post.arr');
			//echo json_encode($data);
			$start_date = $data[0];
			$end_date = $data[1];
			$m = D('Common/Reservation');
			$ret = $m->model_ajax_Report($start_date,$end_date);
			//$ret['count'] = 100;
			//$ret['user_count'] = 60;
			//$ret['admin_count'] = 40;
			echo json_encode($ret);
		}
		
	}
}
